package vashion.azeroth.core.personal.pojo;

import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;

import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

import vashion.azeroth.core.pojo.BaseObject;

public class PersonalFeedTags extends BaseObject {

	private static final long serialVersionUID = -5714119601743050108L;

	
	
	/**
	 * tags纵坐标
	 * 
	 * */
	private String yPos;

	/**
	 * 商品id
	 * 
	 * */
    private String goodID;

	/**
	 * tags横坐标
	 * 
	 * */
    private String xPos;

	/**
	 * ...
	 * 
	 * */
    private String isLeftMode;

	/**
	 * tags文本
	 * 
	 * */
    private String tagText;

	/**
	 * 商品图片地址
	 * 
	 * */
    private String goodPicURL;


    
    
	public String getyPos() {
		return yPos;
	}




	public void setyPos(String yPos) {
		this.yPos = yPos;
	}




	public String getGoodID() {
		return goodID;
	}




	public void setGoodID(String goodID) {
		this.goodID = goodID;
	}




	public String getxPos() {
		return xPos;
	}




	public void setxPos(String xPos) {
		this.xPos = xPos;
	}




	public String getIsLeftMode() {
		return isLeftMode;
	}




	public void setIsLeftMode(String isLeftMode) {
		this.isLeftMode = isLeftMode;
	}




	public String getTagText() {
		return tagText;
	}




	public void setTagText(String tagText) {
		this.tagText = tagText;
	}




	public String getGoodPicURL() {
		return goodPicURL;
	}




	public void setGoodPicURL(String goodPicURL) {
		this.goodPicURL = goodPicURL;
	}




	public static PersonalFeedTags getPersonalProfiles(int memberId, int fansCnt,
			int followCnt, BigDecimal vCnt, int pointCnt, Date timeAdd,
			Date timeEdit, String remark) {
		PersonalFeedTags profiles = new PersonalFeedTags();

		return profiles;
	}
    
	
	public static ArrayList<String> getItemIdsByTags(PersonalPublishFiles files) {
		ArrayList<String> itemIdList = new ArrayList<String>();
		ObjectMapper mapper = new ObjectMapper();
		PersonalFeedTags[] feedTags;
		try {
			feedTags = mapper.readValue(files.getTags(),
					PersonalFeedTags[].class);
			for (int i = 0; i < feedTags.length; i++) {
				itemIdList.add(feedTags[i].goodID);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		return itemIdList;
	}
    
    
    
    
}